# $Id$
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=brltty
pkgver=5.5
pkgrel=2
pkgdesc="Braille display driver for Linux/Unix"
arch=(i686 x86_64)
url="http://mielke.cc/brltty"
license=(GPL LGPL)
depends=(libxaw gpm icu tcl bluez-libs espeak)
makedepends=(at-spi2-core tcl speech-dispatcher cython)
optdepends=('at-spi2-core: X11/GNOME Apps accessibility'
            'atk: ATK bridge for X11/GNOME accessibility')
backup=(etc/brltty.conf)
options=('!emptydirs')
install=brltty.install
source=(http://mielke.cc/brltty/archive/brltty-$pkgver.tar.xz
        brltty.service)
sha256sums=('4ebf1df5922df0efccac4795f5bd1c514fc850348c34d9ec0868e2798b565a36'
            'a342a5e9d36f00a320e1d23d91c482bd5445af52588334307b7e9c09a8cc38ec')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --mandir=/usr/share/man \
    --with-tables-directory=/usr/share/brltty \
    --with-screen-driver=lx \
    --enable-gpm \
    --disable-java-bindings \

  make
}

package() {
  cd $pkgname-$pkgver
  make INSTALL_ROOT="$pkgdir" install
  install -Dm644 Documents/brltty.conf "$pkgdir/etc/brltty.conf"
  install -Dm644 ../brltty.service "$pkgdir/usr/lib/systemd/system/brltty.service"
}
